#! /bin/sh /usr/share/dpatch/dpatch-run
## 01_makfiles.dpatch by Mazen Neifer <mazen.neifer@supaero.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This patch fixes dist_clean target used to remove generated
## DP: files before packaging sources.

@DPATCH@
Index: Makefile.fpc
===================================================================
--- lazarus~/Makefile.fpc
+++ lazarus/Makefile.fpc
@@ -11,7 +11,7 @@
 
 [target]
 programs=lazarus startlazarus
-dirs=lcl components packager/registration ideintf designer packager
+dirs=lcl components packager/registration ideintf designer packager ide tools
 exampledirs=examples
 
 [compiler]
@@ -75,7 +75,7 @@
         
 #-----------------------------------------------------------------------------
 examples: lcl components
-        $(MAKE) -C examples
+#        $(MAKE) -C examples
 
 #-----------------------------------------------------------------------------
 all: lcl components packager/registration ideintf designer packager ide starter lazbuilder
@@ -94,11 +94,13 @@
 purge: cleanlaz
         $(MAKE) -C examples clean
         $(MAKE) -C tools clean
-        $(MAKE) -C doceditor clean
+#        $(MAKE) -C doceditor clean
         $(MAKE) -C tools clean
 
 clean: cleanlaz
 
+cleanall: purge
+
 # create dirs
 installbase:
 ifeq ($(OS_TARGET),win32)
Index: components/Makefile.fpc
===================================================================
--- lazarus~/components/Makefile.fpc
+++ lazarus/components/Makefile.fpc
@@ -4,7 +4,7 @@
 #
 
 [target]
-dirs=synedit codetools
+dirs=synedit codetools rtticontrols printers cgi turbopower_ipro jpeg fpcunit projecttemplates memds sdf tachart tdbf sqldb
 
 [clean]
 files=$(wildcard ./units/*$(OEXT)) \
Index: tools/apiwizz/Makefile.fpc
===================================================================
--- lazarus~/tools/apiwizz/Makefile.fpc	(revision 13662)
+++ lazarus/tools/apiwizz/Makefile.fpc	(working copy)
@@ -13,7 +13,7 @@
 packages=rtl
 
 [clean]
-#units=apiwizard
+units=apiwizard
 
 [compiler]
 options=-gl $(LAZARUS_LIBPATHS)
Index: lcl/interfaces/gtk/Makefile.fpc
===================================================================
--- lazarus~/lcl/interfaces/gtk/Makefile.fpc	(révision 14464)
+++ lazarus/lcl/interfaces/gtk/Makefile.fpc	(copie de travail)
@@ -7,7 +7,7 @@
 main=lcl
 
 [require]
-packages=rtl gtk
+packages=rtl gtk1
 
 [target]
 units=interfaces
Index: lcl/interfaces/gtk2/Makefile.fpc
===================================================================
--- lazarus~/lcl/interfaces/gtk2/Makefile.fpc	(revision 13662)
+++ lazarus/lcl/interfaces/gtk2/Makefile.fpc	(working copy)
@@ -7,17 +7,16 @@
 main=lazarus/lcl
 
 [require]
-packages=rtl gtk
+packages=rtl gtk2
 
 [target]
 units=interfaces
 implicitunits=gtk2int
 
 [compiler]
-options=-gl -dgtk2
+options=-gl -dgtk2 -Fi../gtk
 unitdir=../../units/$(CPU_TARGET)-$(OS_TARGET) ../gtk .
 unittargetdir=../../units/$(CPU_TARGET)-$(OS_TARGET)/gtk2
-includedir=../gtk
 
 [clean]
 files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \
Index: examples/Makefile.fpc
===================================================================
--- lazarus~/examples/Makefile.fpc	(revision 13662)
+++ lazarus/examples/Makefile.fpc	(working copy)
@@ -37,6 +37,9 @@
 
 [clean]
 files=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) \
+  $(wildcard units/$(CPU_TARGET)-$(OS_TARGET)/*$(OEXT)) \
+  $(wildcard units/$(CPU_TARGET)-$(OS_TARGET)/*$(PPUEXT)) \
+  $(wildcard trayicon/*$(OEXT)) $(wildcard trayicon/*$(PPUEXT)) \
   hello \
   bitbutton \
   checkbox \
@@ -56,6 +56,7 @@
   scrollbar \
   speedtest \
   synedit1 \
+  taborder \
   testall \
   toolbar \
   trackbar
Index: components/cgi/Makefile.fpc
===================================================================
--- lazarus~/components/cgi/Makefile.fpc	(révision 14464)
+++ lazarus/components/cgi/Makefile.fpc	(copie de travail)
@@ -11,6 +11,7 @@
 options=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 
 [target]
+dirs=ide
 units=cgilaz.pas
 
 [clean]
Index: components/printers/Makefile.fpc
===================================================================
--- lazarus~/components/printers/Makefile.fpc	(révision 14464)
+++ lazarus/components/printers/Makefile.fpc	(copie de travail)
@@ -11,6 +11,7 @@
 options=-dUseCache -dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 
 [target]
+dirs=design
 units=printer4lazarus.pas
 
 [clean]
Index: components/fpcunit/Makefile.fpc
===================================================================
--- lazarus~/components/fpcunit/Makefile.fpc	(révision 14464)
+++ lazarus/components/fpcunit/Makefile.fpc	(copie de travail)
@@ -11,6 +11,7 @@
 options=-dLCL -dLCL$(LCL_PLATFORM) -S2 -gl
 
 [target]
+dirs=ide
 units=fpcunittestrunner.pas
 
 [clean]
